package com.zh.pojo.vo;

import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import java.util.Date;


/**
 * <p>
 * 司机实名信息
 * </p>
 *
 * @author 初四
 * @since 2024-06-13
 */
@Data
@Accessors(chain = true)
public class DriverAuthVo {

    @NotEmpty(message = "姓名不为空")
    private String name;

    @NotEmpty(message = "性别不为空")
    private String gender;

    private String idNumber;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date birthday;

    private Integer realAuthStatus;

    private String idcardAddress;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date idcardExpire;

    private String idcardFront;

    private String idcardBack;

    private String idcardHolding;

    private String carClass;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")

    private Date drcardExpire;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date drcardIssueDate;

    private String drcardFront;

    private String drcardBack;

    private String drcardHolding;
    @NotEmpty(message = "手机号不为空")
    private String phone;

    @NotEmpty(message = "电子邮箱不为空")
    private String email;

    @NotEmpty(message = "收信地址不为空")
    private String mailAddress;

    private String contactName;

    private String contactPhone;
    public Long getYear() {
        return DateUtil.betweenYear(this.getDrcardIssueDate(), new Date(), true);
    }

}
